<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <title>Artistic Style Developer</title>
    <meta http-equiv="Content-Language" content="en-us" />
    <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
    <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <link href="styles.css" rel="stylesheet" type="text/css" />
</head>

<body>

    <!-- body text -->

    <h1>Artistic Style Developer Information</h1>

    <p>
        &nbsp;</p>
    <p class="noindent">
        Artistic Style has compile options for creating a shared library (DLL) or static library for use with a Graphical
        User Interface (GUI). The shared library can be called from a C++, <span style="white-space: nowrap;">Objective-C</span>, C#, or Python program. There
        are also compile options for a Java Native Interface (JNI) that allows it to be called from a Java program. Information
        on compiling the various configurations of Artistic Style is in the Install Information.</p>
    <p class="noindent">
        The following Examples show how to call the Artistic Style shared library using the various programming languages.
        They are command line programs and do NOT contain a Graphical User Interface for the Artistic Style options. Their
        purpose is to demonstrate the various calling procedures.</p>
    <p class="noindent">
        Source code, documentation, and test files for all examples can be downloaded below or obtained from the Subversion
        repository. These projects also require the source from Artistic Style in addition to the development examples.
        There is information on checking files out of the repository on the Artistic Style <a href="http://astyle.sourceforge.net/subversion.html">
            Subversion Repository</a> page.</p>
    <p class="noindent">
        You can also <a href="http://astyle.svn.sourceforge.net/viewvc/astyle/">browse the subversion repository</a>.
        The current development release is in the "trunk" directory. This gives you a view of the project's code without
        actually checking-out the files.</p>

    <h3>Examples</h3>

    <p>
        Source code from the following examples can be copied and pasted into an editor or development environment for
        compiling and running. Or the source code can be downloaded from the "Source Code Downloads" section below. The
        code highlighting for the example html pages was done with <a href="http://www.andre-simon.de/"
            target="_blank" title="open new window">Highlight</a>.
        The examples were formatted with Artistic Style using the Horstmann style.</p>
    <p>
        <a href="cpp.html">Calling Artistic Style from a C++ Program</a> contains information on calling Artistic Style
        as a shared or static library from a C++ program. It includes a C++ sample program that can be used to test the
        Artistic Style libraries.</p>
    <p>
        <a href="objc.html">Calling Artistic Style from an <span style="white-space: nowrap;">Objective-C</span> Program</a> contains information on calling Artistic
        Style as a shared or static library from an <span style="white-space: nowrap;">Objective-C</span> program. It includes an <span style="white-space: nowrap;">Objective-C</span> sample program that
        can be used to test the Artistic Style shared libraries.</p>
    <p style="margin-left: 0.5in;">
        <a href="gnustep.html"><span style="white-space: nowrap;">Objective-C</span> on Windows and Linux</a> contains information on compiling and running
        <span style="white-space: nowrap;">Objective-C</span> programs using GNUstep. It has instructions for compiling the Example program on Windows or 
        Linux.</p>
    <p>
        <a href="jni.html">Calling Artistic Style as a Java Native Interface</a> contains information on calling Artistic
        Style as a shared library from a Java program using the Java Native Interface (JNI). It includes a Java sample
        program that can be used to test the shared library. The Java Development Kit (JDK) must be installed to compile
        Artistic Style.</p>
    <p>
        <a href="sharp.html">Calling Artistic Style from a C# Program</a> contains information on calling Artistic Style
        as a shared library from a C# program. It includes a C# sample program that can be used to test the shared 
        library.</p>
    <p style="margin-left: 0.5in;">
        <a href="sharp2.html">Calling Artistic Style from a C# Program Using Explicit Linking</a> contains information
        on calling Artistic Style as a shared library from a C# program. It uses explicit linking to do a dynamic load
        of the shared library. It includes a C# sample program that can be used to test the shared library.</p>
    <p style="margin-left: 0.5in;">
        With explicit linking the shared library name can be changed at runtime, allowing the C# program to load 
        either an x86 or x64 bit shared library. This provides the capability to make the program run on &quot;Any 
        CPU&quot;. The shared object can also be loaded from any directory, not just the directories searched by the 
        system.</p>
    <p>
        <a href="python.html">Calling Artistic Style from a Python Script</a> contains information on calling Artistic
        Style as a shared library from a Python script. It includes a sample Python script that can be used to test the
        shared library.</p>

    <h3>Source Code Downloads</h3>

    <p>
        The downloads contain the above example source files and the test data. The test data is the same for all 
        downloads.</p>

    <h4>
        <a href="https://sourceforge.net/projects/astyle/files/OldFiles/examples/example-cpp.zip" target="_blank"
            title="open new window">C++ Example</a>
    </h4>

    <p>
        The example for C++ contains the methods to call Artistic Style from a static or shared library using a C++ program.
        Compile Artistic Style as a static or shared library using the macro ASTYLE_LIB. Copy the shared library to the
        same folder as the C++ Example executable. Compile Example.cpp as an executable and link it to the library. It
        will format files in the test&#8209;data directory included in the download.</p>

    <h4>
        <a href="https://sourceforge.net/projects/astyle/files/OldFiles/examples/example-objc.zip" target="_blank"
            title="open new window"><span style="white-space: nowrap;">Objective-C</span> Example</a>
    </h4>

    <p>
        The example for <span style="white-space: nowrap;">Objective-C</span> contains the methods to call Artistic Style from a static or shared library
        using an <span style="white-space: nowrap;">Objective-C</span> program. Compile Artistic Style as a static or shared library using the macro ASTYLE_LIB.
        Copy the shared library to the same folder as the <span style="white-space: nowrap;">Objective-C</span> Example executable. It will format files in
        the test&#8209;data directory included in the download.</p>

    <h4>
        <a href="https://sourceforge.net/projects/astyle/files/OldFiles/examples/example-java.zip" target="_blank"
            title="open new window">Java Example</a>
    </h4>

    <p>
        The example for Java includes an AStyleInterface class that calls the shared library using the Java Native Interface
        (JNI). Artistic Style must be compiled as a shared library using the macro ASTYLE_JNI. Copy the shared library
        to the same folder as the Java class files (it is loaded from the classpath directory). It will format files in
        the test&#8209;data directory included in the download.</p>

    <h4>
        <a href="https://sourceforge.net/projects/astyle/files/OldFiles/examples/example-sharp.zip" target="_blank"
            title="open new window">C# Example</a>
    </h4>

    <p>
        This example for C# includes an AStyleInterface class that calls the shared library using a C# program. Compile
        Artistic Style as a shared library using the macro ASTYLE_LIB. Copy the shared library to the same folder as the
        C# class files (C# does a Windows type search for the shared library, looking first in the startup program's directory).
        It will format files in the test&#8209;data directory included in the download.</p>

    <h4 style="margin-left: 0.5in;">
        <a href="https://sourceforge.net/projects/astyle/files/OldFiles/examples/example-sharp2.zip" target="_blank"
            title="open new window">C# Example  Using Explicit Linking</a>
    </h4>

    <p style="margin-left: 0.5in;">
        This example for C# includes an AStyleInterface class that calls the shared library using a C# program. 
        It uses explicit linking to do a dynamic load of the shared library. Compile Artistic Style as a shared library
        using the macro ASTYLE_LIB. Copy the shared library to the same folder as the C# class files. It will format files
        in the test&#8209;data directory included in the download.</p>

    <h4>
        <a href="https://sourceforge.net/projects/astyle/files/OldFiles/examples/example-python.zip" target="_blank"
            title="open new window">Python Examples</a>
    </h4>

    <p>
        This download contains three Python scripts. The script ExampleExe.py calls an Artistic Style executable to format
        C++ source code. The scripts ExampleByte.py and ExampleUnicode.py call the Artistic Style shared library. The
        executable and shared library must be compiled using the macro ASTYLE_LIB. Copy the executable and shared library
        to the same folder as the Python scripts. They will format files in the test&#8209;data directory included in
        the download.</p>

    <p>
        &nbsp;</p>

    <p style="margin-left: -0.4in; text-align: center;">
        <a href="http://sourceforge.net/projects/astyle">
            <img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2319&type=16" alt="" />
        </a></p>

    <p>
        &nbsp;</p>
</body>

</html>

